package com.wyz.tracing.domain.entity.tracing.different.field;

import com.wyz.tracing.domain.entity.base.Identifier;
import com.wyz.tracing.enums.DifferenceType;
import lombok.Getter;
import lombok.Setter;

import java.lang.reflect.Type;
import java.util.HashMap;
import java.util.Map;

/**
 * @author wyz
 * @version 1.0
 * @date 2023/8/15
 *
 * Entity类型字段的差异
 *
 */
@Getter
@Setter
public class AggregareFieldDifference extends FieldDifference {

    private Map<String, FieldDifference> fieldDifferences;

    private final Identifier identifier;

    public AggregareFieldDifference(String name, Type type, Object snapshotValue, Object tracValue, DifferenceType differenceType, Identifier identifier) {
        super(name, type, snapshotValue, tracValue, differenceType);
        this.identifier = identifier;
        this.fieldDifferences = new HashMap<>();
    }
}
